1. Field of the Invention
The present invention relates to image processing apparatuses and image processing methods, and more particularly to an image processing technique for detecting an image region indicating a poor color tone of eyes.
2. Description of the Related Art
Various methods for correcting a poor color tone of eyes, which may be caused by the flash from a camera, have been proposed. In general, a poor color tone of eyes is well known as a red-eye phenomenon (or red-eye effect). The environment having an insufficient illumination may cause a red-eye phenomenon, if a human or an animal such as a dog or a cat is photographed with flash.
More specifically, the flash light enters the eye through an opened pupil and reflects off the back of the eye. At this moment, red light can be returned from the capillary on the eyeground. The red-eye phenomenon often occurs if a photographed person has bright pigments because of higher transmissivity of a pupil, i.e., a crystalline lens.
Many digital cameras have compact bodies. In such a compact body, the optical axis of a lens is positioned closely to a flash light source. When a light source position of the flash is adjacent to the optical axis of the lens, the red-eye phenomenon occurs easily.
One of the methods for reducing the red-eye phenomenon is a pre-light emission prior to photographing, so that pupils of a photographed person can be closed beforehand. However, according to this method, a large capacity of battery will be required and a photographed person may change the face by the pre-light emission.
To correct or reduce red eyes, personal computers or comparable apparatuses can process and reconstruct an image from digital data obtained by a digital camera. In general, the methods for correcting red eyes based on digital image data can be roughly classified into three types of correction: i.e., manual correction; semiautomatic correction; and automatic correction.
The manual correction requires a user's manipulating a pointing device, such as a mouse, a stylus, or a tablet, or a similar touch panel to designate a red eye region (i.e., a region to be corrected) which is displayed on a display unit.
The semiautomatic correction requires a user's rough designation about a region where a red eye is present and a computer's operation for specifying a correction range of a red eye based on the information given by the user and performing necessary corrections. For example, the user can designate a region surrounding an eye, or a point near an eye, with a pointing device. The computer specifies a correction range and executes corrections based on information on the designated region or designated point.
The automatic correction requires no special operation by a user because a computer executes fully automated operations including automatically detecting a correction region from digital image data and executing correction processing.
According to the manual or semiautomatic correction, a user has to manually designate a portion to be corrected. For example, it will be troublesome for auser if required to display an enlarged image including a region to be corrected and to designate a correction region on image data. If a large screen of a display equipped in a personal computer system is available, such a designating operation may be relatively easy. However, in the case of ordinary digital cameras or printers, which have a small display unit of several inches, unless a user enlarges an image and scrolls to the appropriate portion of the enlarged image, the user cannot find and designate a correction region.
There are conventional methods for automatically correcting the red-eye phenomenon, requiring no complicated operations and effectively applicable to a compact device equipped with a small display unit.
For example, Japanese Patent Application Laid-open No. 11-136498 discusses a method including the steps of detecting a skin color region from an image, searching and detecting pixels constituting a red eye within the detected region, and correcting the pixels constituting the red eye.
Furthermore, Japanese Patent Application Laid-open No. 11-149559 discusses a method including the steps of detecting a skin color region, detecting recessed regions having lower brightness corresponding to a pupil, and determining an eye based on a distance between two recessed regions in the detected region.
Furthermore, Japanese Patent Application Laid-open 2000-125320 discusses a method including the steps of detecting a skin color region, determining whether the detected skin color region has characteristics of a human face, detecting a set of red-eye defects in the detected region, evaluating a distance and size of the red-eye defects, and specifying a red eye region.
Furthermore, Japanese Patent Application Laid-open 11-284874 discusses a method including the steps of automatically determining whether an image includes a red pupil, detecting a position and size of the red pupil, and automatically converting red pixels within the pupil into a predetermined color of pixels.
However, the conventional automatic red-eye correction methods have the following problems.
The human skin color detection or the face detection relying on a neural network requires searching a wide range of image data to obtain a reliable result from the detection of a red eye region. In other words, a large amount of memory is required and a huge amount of calculations will be necessary. Such processing may not be so difficult for a personal computer equipped with a high performance CPU operable with a clock of several GHz and a memory of several hundreds MB. However, digital cameras and printers may not be able to process such a great amount of image data.
Furthermore, besides the above-described automatic corrections, there are many conventional methods relying on the difference in saturation to discriminate a red eye region from a peripheral region. However, the saturation-based determination cannot be preferably applied to a person having dark pigments. As is well known, when pixel values are defined in the RGB system, a saturation S can be expressed by the following formula (1).S={max(R, G, B)−min(R, G, B)}/max(R, G, B)  (1)where, max (R, G, B) represents a maximum value among R, G and B components, and min (R, G, B) represents a minimum value among R, G and B components.
According to experimental results, the skin color region of a typical Japanese person has a unique distribution concentrated from 0 to 30 degrees in the hue (0-359 degrees) According to the hue expression in the HIS (hue-intensity-saturation) system, a region near 0 degree is red and the color gradually changes to yellow when the hue increases. The R, G and B values in the range of 0 to 30 degrees have the following relationship.R>G>B  (2)
As described above, compared with a person having bright pigments, a person having dark pigments seldom has brighter red eyes. As an example, a typical Japanese person will have the following pixel values in a red eye region and a skin color region around the eye.    Red eye region: (R, G, B)=(109, 58, 65)    Skin color region: (R, G, B)=(226, 183, 128)
In this case, the saturation of a red eye region pixel is 40, while the saturation of a skin color region pixel is 43. There is no substantial difference between two saturation values.
In other words, the method relying on the saturation may not be able to determine a red eye pixel if a photographed object (person) has dark pigments.